package UserUI;

import loginUI.LoginFrame;
import userManageUI.ChangePassWordFrame;
import userManageUI.StudentInfoFrame;
import userManageUI.TeacherInfoFrame;
import courseManageUI.CourseInfoFrame;
import frameUI.BuildFrame;
import frameUI.ModifyFrame;
import frameUI.ShowFrame;
import VO.UserVO;

public class SchAdmController {

	private static UserVO userVO;
	private static SchAdminFrame schAdminFrame;
	private static CourseInfoFrame courseInfoFrame;
	private static BuildFrame buildFrame;
	private static ModifyFrame modifyFrame;
	private static StudentInfoFrame studentInfoFrame;
	private static TeacherInfoFrame teacherInfoFrame;
	private static ChangePassWordFrame changePassWordFrame;
	private static ShowFrame showFrame;
	public SchAdmController(UserVO userVO){
		this.userVO=userVO;
		schAdminFrame = new SchAdminFrame(this.userVO);
		courseInfoFrame = new CourseInfoFrame(this.userVO); 
		buildFrame = new BuildFrame(this.userVO);
		modifyFrame = new ModifyFrame(this.userVO,false);
		studentInfoFrame = new StudentInfoFrame(this.userVO,false);
		teacherInfoFrame = new TeacherInfoFrame(this.userVO,false);
		changePassWordFrame = new ChangePassWordFrame(this.userVO);
		//showFrame = new ShowFrame(this.userVO, false, framepo);
		
	}
	public SchAdmController(){
		
	}
	
	

	public static void jumpTo(String frame){
		switch(frame){
		case"login":
			new LoginFrame().setVisible(true);break;
		case"main":
			schAdminFrame.setVisible(true);break;
		case"teacherInfoFrame":
			teacherInfoFrame.setVisible(true);break;
		case"courseInfoFrame":
			courseInfoFrame.setVisible(true);break;
		case"studentInfoFrame":
			studentInfoFrame.setVisible(true);break;
		case"changePassWordFrame":
			changePassWordFrame.setVisible(true);break;
//		case"showFrame":
//			showFrame.setVisible(true);break;
		}
	}
}
